package com.city.itis.action;

import java.util.List;

import com.city.itis.domain.SiteCategory;
import com.city.itis.service.SiteCategoryService;
import com.opensymphony.xwork2.ActionSupport;

/**
 * AdminIndexAction
 * @author WY
 *
 */
public class IndexAction extends ActionSupport 
{
	private static final long serialVersionUID = 1L;	//系统自动生成的版本序列号

	private List<SiteCategory> siteCategoryList;	//声明siteCateogryList对象
	
	private SiteCategoryService siteCategoryService;	//声明siteCategoryService对象

	public String main()
	{
		siteCategoryList=siteCategoryService.findAll();
		if(siteCategoryList!=null)
		{
			return SUCCESS;
		}
			return ERROR;
	}
	public String search()
	{
		siteCategoryList=siteCategoryService.findAll();
		if(siteCategoryList!=null)
		{
			
			return SUCCESS;
		}
		return ERROR;
	}
	
	public String getCategoryList()
	{
		siteCategoryList=siteCategoryService.findAll();
		if(siteCategoryList!=null)
		{
			return SUCCESS;
		}
		return ERROR;
	}
	
	public List<SiteCategory> getSiteCategoryList() {
		return siteCategoryList;
	}

	public void setSiteCategoryList(List<SiteCategory> siteCategoryList) {
		this.siteCategoryList = siteCategoryList;
	}

	public SiteCategoryService getSiteCategoryService() {
		return siteCategoryService;
	}

	public void setSiteCategoryService(SiteCategoryService siteCategoryService) {
		this.siteCategoryService = siteCategoryService;
	}

	
	
}
